package org.zjx.data.screen;

import org.zjx.command.entity.screen.*;
import org.zjx.data.BaseSceneBuilder;

import java.awt.*;

public class AoLaiGuoSceneBuilder extends BaseSceneBuilder {

    @Override
    protected String getSceneName() {
        return "傲来国";
    }

    @Override
    protected Dimension getSceneSize() {
        return new Dimension(222, 150);
    }

    @Override
    protected void addMonsters() {

    }

    @Override
    protected void addNpcs() {
        // 添加傲来国NPC
        addNpc("驿站老板", new Point(171, 14), new Point(57, 96));
        addNpc("傲来珍品商人", new Point(55, 118));
        addNpc("超级巫医", new Point(44, 28));
        addNpc("九头精怪", new Point(35, 89));
        addNpc("金毛猿", new Point(193, 131));
        addNpc("红毛猿", new Point(45, 98));
        addNpc("蝴蝶妹妹", new Point(60, 54));
        addNpc("偷偷怪", new Point(127, 120));
        addNpc("傲来商人", new Point(183, 105));
        addNpc("傲来货商", new Point(94, 107));
        addNpc("傲来特产商人", new Point(48, 33));
        addNpc("仙岛引路使", new Point(22, 98));
    }

    @Override
    protected void addRooms() {
        // 创建傲来国房间
        Room aoLaiClothShop = createRoom("傲来国服饰店", null);
        addNpcToRoom(aoLaiClothShop, "牛师傅", new Point(19, 18));
        rooms.add(aoLaiClothShop);

        Room aoLaiDrugStore = createRoom("傲来国药店", null);
        addNpcToRoom(aoLaiDrugStore, "沈妙衣", new Point(16, 19));
        rooms.add(aoLaiDrugStore);

        Room aoLaiWeaponShop = createRoom("傲来国武器店", null);
        addNpcToRoom(aoLaiWeaponShop, "杜天", new Point(12, 12));
        rooms.add(aoLaiWeaponShop);

        Room shengDian = createRoom("圣殿", new Dimension(68, 46));
        addNpcToRoom(shengDian, "小紫", new Point(28, 17));
        rooms.add(shengDian);
    }

    @Override
    protected void addTeleports() {
        // 添加场景传送点
        addSceneTeleport(new Point(210, 138), "花果山", new Point(10, 10), new Point(215, 146));
        addSceneTeleport(new Point(12, 141), "女儿村", new Point(119, 12), new Point(7, 142));

        // 添加NPC传送点
        addNpcTeleport("驿站老板", new Point(161, 17), "东海湾", new Point(85, 23), new Point(168, 15));
        addNpcTeleport("仙岛引路使", new Point(26, 97), "蓬莱仙岛", new Point(9, 41), new Point(22, 98));

        // 添加房间入口传送点
        addRoomTeleport(new Point(138, 105), "圣殿", new Point(23, 9), new Point(141, 107));
        addRoomTeleport(new Point(128, 42), "傲来国武器店", new Point(13, 6), new Point(131, 42));
        addRoomTeleport(new Point(33, 71), "傲来国服饰店", new Point(36, 8), new Point(30, 72));
        addRoomTeleport(new Point(57, 39), "傲来国药店", new Point(37, 11), new Point(54, 41));
    }

    public static void main(String[] args) {
        AoLaiGuoSceneBuilder builder = new AoLaiGuoSceneBuilder();
        builder.execute("aolaiguo_scene.json", "傲来国");
    }
}